#!/bin/bash

cd /opt/jen-space
sed -e 's/jarname/'$1'.jar/g' -e 's/pt/'$2'/g'  Dockerfile.base > Dockerfile
sed -e 's/jarname/'$1'/g' -e 's/ns/'$3'/g' -e 's/num/'$4'/g'  dep.yaml.base > $1-dep.yaml
sed -e 's/jarname/'$1'/g' -e 's/pt/'$2'/g'  -e 's/ns/'$3'/g' -e 's/np/'$5'/g'  svc.yaml.base > $1-svc.yaml
docker build -t 192.168.63.20:10080/library/$1:latest .
